Communication apparatus, communication system, and communication method

ABSTRACT

A communication apparatus includes: a data generating unit that generates write data to be sent to any other communication apparatus at an arbitrary timing; a communication unit that repeatedly sends a read request to the other communication apparatus until the write data is generated and, at the same time, repeatedly receives a read response sent from the other communication apparatus in response to the read request; and a data acquisition unit that acquires read data, which is sent along with the read response by the other communication apparatus, when the read data is generated at an arbitrary timing by the other communication apparatus.

CROSS-REFERENCE TO RELATED APPLICATION

The present application claims priority from Japanese Patent ApplicationNo. JP 2011-033543 filed in the Japanese Patent Office on Feb. 18, 2011,the entire content of which is incorporated herein by reference.

BACKGROUND

The present disclosure relates to communication apparatuses,communication systems, and communication methods.

In related technologies such as those disclosed in Japanese UnexaminedPatent Application Publications No. 2008-160856 and No. 2010-134672,there are some cases where passive communication between twocommunication apparatuses is performed in response to a communicationrequest (one of commands) made only by one of the two communicationapparatuses. In these cases, the one communication apparatus that makesthe communication request works as an initiator, and the othercommunication apparatus works as a target.

SUMMARY

Each of the initiator and the target generates data at an arbitrarytiming. Upon completing the generation of data to be sent to the target,the initiator sends a communication request to the target at anarbitrary timing and can send the data to the target. On the other hand,even if the target completes the generation of data to be sent to theinitiator, it is difficult for the target to send the data to theinitiator until the target receives a communication request from theinitiator.

In order to resolve the above problem, a method in which a flag showingthe presence or absence of data to be sent to the initiator is stored ina memory of the target and this flag information is periodically checkedby the initiator is conceivable. In the above method, however, time iswasted for the initiator to confirm the presence of the flag and thensend the communication request. On top of that, extra resources are usedfor storing the flag information and checking the flag information.

With the above-described problems in mind, embodiments of the presentdisclosure are intended to provide communication apparatuses, acommunication system, and a communication method, in which thecommunication apparatus that works as a target can send data at anarbitrary timing to a communication apparatus that works as aninitiator.

An embodiment of the present disclosure provides a communicationapparatus including: a data generating unit that generates write data tobe sent to any other communication apparatus at an arbitrary timing; acommunication unit that repeatedly sends a read request to the othercommunication apparatus until the write data is generated and, at thesame time, repeatedly receives a read response sent from the othercommunication apparatus in response to the read request; and a dataacquisition unit that acquires read data, which is sent along with theread response by the other communication apparatus, when the read datais generated at an arbitrary timing by the other communicationapparatus.

Another embodiment of the present disclosure provides a communicationapparatus including: a data generating unit that generates read data tobe sent to any other communication apparatus at an arbitrary timing; anda communication unit that repeatedly receives a read request sent fromthe other communication apparatus until write data is generated by theother communication apparatus and, at the same time, repeatedly sends aread response to the other communication apparatus in response to theread request, and sends the read data along with the read response tothe other communication apparatus when the read data is generated.

Another embodiment of the present disclosure provides a communicationsystem having a first communication apparatus and a second communicationapparatus, in which the first communication apparatus includes: a datagenerating unit that generates write data to be sent to a secondcommunication apparatus at an arbitrary timing; a communication unitthat repeatedly sends a read request to the second communicationapparatus until the write data is generated and, at the same time,repeatedly receives a read response sent from the second communicationapparatus in response to the read request; and a data acquisition unitthat acquires read data, which is sent along with the read response bythe second communication apparatus, when the read data is generated atan arbitrary timing by the second communication apparatus, and thesecond communication apparatus includes: a data generating unit thatgenerates read data to be sent to the first communication apparatus atan arbitrary timing; and a communication unit that repeatedly receivesthe read request sent from the first communication apparatus until thewrite data is generated by the first communication apparatus and, at thesame time, repeatedly sends the read response to the first communicationapparatus in response to the read request, and sends the read data alongwith the read response to the first communication apparatus when theread data is generated.

Another embodiment of the present disclosure provides a communicationmethod including: causing a first communication apparatus to generatewrite data to be sent to a second communication apparatus at anarbitrary timing; causing the second communication apparatus to generateread data to be sent to the first communication apparatus at anarbitrary timing; causing the first communication apparatus torepeatedly send a read request to the second communication apparatusuntil the write data is generated; causing the second communicationapparatus to repeatedly send a read response in response to the readrequest to the first communication apparatus; and causing the firstcommunication apparatus to receive the read request and acquire the readdata, which is sent along with the read response by the secondcommunication apparatus, when the read data is generated by the secondcommunication apparatus.

As described above, according to the embodiments of the presentdisclosure, two communication apparatuses, a communication system, and acommunication method, in which one of the two communication apparatusesthat works as a target can send data at an arbitrary timing to the otherthat works as an initiator, can be provided.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram showing an overview of a communication methodaccording to an embodiment of the present disclosure;

FIG. 2 is a diagram showing passive communication performed between aninitiator and a target;

FIG. 3 is a block diagram showing the functional configuration of acommunication system;

FIG. 4 is a flowchart showing the operation of the initiator;

FIG. 5 is a flowchart showing the operation of the target;

FIG. 6 is a sequence diagram showing the communication method accordingto the embodiment of the present disclosure;

FIG. 7 is a diagram showing examples of data structures of communicationrequests/communication responses; and

FIG. 8 is a diagram showing an example of a data structure of anattribute information block.

DETAILED DESCRIPTION OF EMBODIMENTS

Preferred embodiments of the present disclosure will be described withreference to the accompanying drawings hereinafter. In thisspecification and the accompanying drawings, components that haveeffectively the same functional configuration are indicated by the samereference numerals and repeated description is avoided.

1. OVERVIEW OF COMMUNICATION METHOD

First, an overview of a communication method according to an embodimentof the present disclosure will be described with reference to FIG. 1.FIG. 1 is a diagram showing an overview of a communication methodaccording to an embodiment of the present disclosure.

As shown in FIG. 1, the communication method according to the embodimentof the present disclosure is a communication method in whichcommunication is performed between a first communication apparatusworking as an initiator 10 and a second communication apparatus workingas a target 20. For example, the initiator 10 includes a reader/writer,and the target 20 includes an RFID (radio frequency identification)module and a host (CPU). Passive communication is performed between theinitiator 10 and the target 20 in response to a communication request(one of commands) such as a write request or a read request sent by theinitiator 10.

In the communication method according to the embodiment of the presentdisclosure, the initiator 10 generates write data to be sent to thetarget 20 at an arbitrary timing, and the target 20 generates read datato be sent to the initiator 10 at an arbitrary timing. After generatingwrite data, the initiator 10 sends a write request and the write data tothe target 20, and the target 20 acquires the write data in response tothe write request.

The initiator 10 repeatedly sends a read request to the target 20 untilthe initiator 10 generates write data, and the target 20 repeatedlysends a read response in response to the read request to the initiator10. Subsequently, after the target 20 generates read data, the initiator10 acquires the read data along with the read response sent by thetarget 20.

In the above-described way, even if the target 20 does not have anotification function of issuing a communication request, the target 20can send the read data to the initiator 10 at an arbitrary timing bysending the read data at the timing of the read data generation inresponse to the read request the target 20 repeatedly receives.Therefore, two-way communication can be effectively performed betweenthe initiator 10 and the target 20 in synchronization with the timing ofthe read data generation or the write data generation.

2. CONFIGURATION OF COMMUNICATION SYSTEM

Next, a configuration of a communication system according to theembodiment of the present disclosure will be described with reference toFIG. 2 and FIG. 3. FIG. 2 is a diagram showing passive communicationperformed between the initiator 10 and the target 20.

As shown in FIG. 2, passive communication is performed between theinitiator 10 and the target 20 in compliance with an NFC (near fieldcommunication) protocol or the like. The NFC protocol is a protocol forshort range wireless communication that employs electromagneticinduction phenomenon and uses a single frequency carrier, for example,13.56 MHz in the ISM (industrial, scientific and medical) band. Shortrange wireless communication is communication performed between twocommunication apparatuses spaced apart from each other by about severaltens of centimeters, and this type of wireless communication includescommunication performed between two communication apparatuses that arecontacting each other.

In the NFC, communication is performed in a passive mode or in an activemode. In a passive mode, as shown in FIG. 2, communication is performedin such a way that one communication apparatus works as the initiator10, and the other works as the target 20. The initiator 10 sends acommunication request (one of commands) to the target 20, and the target20 sends a communication response (one of responses) to the initiator 10in response to the communication request. The initiator 10 sends thecommunication request and data to the target 20 by modulating anelectromagnetic wave R (used as a carrier wave) generated by theinitiator 10 itself (in the state ST21), and the target 20 sends thecommunication response and data to the initiator 10 by load-modulatingthe electromagnetic wave R (used as the carrier wave) generated by theinitiator 10 (in the state ST22).

FIG. 3 is a block diagram showing the functional configuration of thecommunication system. As shown in FIG. 3, the communication systemincludes the initiator 10 and the target 20.

The initiator 10 includes a controller and a reader/writer connected tothe controller (neither is shown). The controller can be a personalcomputer, a PDA, a mobile phone, a consumer electronics device, or thelike. Alternatively, the controller can be a CPU mounted in the abovedevices. The target 20 includes a host (CPU) and an RFID moduleconnected to the host (neither is shown). The host can be a personalcomputer, a PDA, a mobile phone, a consumer electronics device, or thelike. Alternatively, the host can be a CPU mounted in the above devices.The controller and the reader/writer are connected to each other via acommunication interface. The host and the RFID are also connected toeach other via a communication interface.

The first communication apparatus working as the initiator 10 includes acontrol unit 11, a memory unit 13, and a data processing unit 15. Thecontrol unit 11 works as a data generating unit and a data acquisitionunit, and the data processing unit 15 works as a communication unit.FIG. 3 shows that the controller unit 11, the memory unit 13, and thedata processing unit 15 included in the initiator 10 are configured asan all-one-unit, but each of these units can be provided as a separateunit.

The control unit 11 generates write data to be sent to the target 20 atan arbitrary timing. The controller 11 judges whether the generation ofthe write data is completed or not, and, if completed, generates a writerequest, and controls the data processing unit 15 so that the writerequest as well as the write data is sent to the target 20. Thecontroller 11 repeatedly generates a read request until the write datais generated, and controls the data processing unit so that the readrequest is sent to the target 20. In addition, the control unit 11controls the data processing unit 15 so that the data processing unit 15acquires read data along with a read response sent from the target 20when the target 20 generates the read data. In addition, the controlunit 11 stores the acquired read data in the memory unit 13.

The data processing unit 15 sends the write request along with the writedata to the target 20 and also sends the read request to the target 20by sending an electromagnetic wave that the data processing unit 15modulates with the use of an antenna coil or the like. In addition, thedata processing unit 15 receives a write response from the target 20 andalso receives the read response along with the read data from the target20 by receiving an electromagnetic wave load-modulated by the target 20.The data processing unit 15 repeatedly sends the read request to thetarget 20 until the write data is generated, and sends the write requestalong with the write data to the target 20 when the write data isgenerated.

The second communication apparatus working as the target 20 includes acontrol unit 21, a memory unit 23, and a data processing unit 25. Thecontrol unit 21 works as a data generating unit and a data acquisitionunit, and the data processing unit 25 works as a communication unit.FIG. 3 shows that the controller unit 21, the memory unit 23, and thedata processing unit 25 included in the target 20 are configured as anall-one-unit, but each of these units can be provided as a separateunit.

Upon receiving the write request, the control unit 21 acquires the writedata sent by the initiator 10 along with the write request, and storesthe write data in the memory unit 23. In addition, the control unit 21controls the data processing unit 25 so that the write response is sentto the initiator 10. The control unit 21 generates the read data to besent to the initiator 10 at an arbitrary timing. Upon receiving the readrequest, the controller 21 judges whether the generation of the readdata is completed or not, and, if completed, controls the dataprocessing unit 25 so that the read response is sent to the initiator10. The control unit controls the data processing unit 25 so that thedata processing unit 25 sends the read response as well as the read datato the initiator 10 when the generation of the read data is completed,and sends the read response to the initiator 10 when the generation ofthe read data is not completed.

The data processing unit 25 receives the write request along with thewrite data sent from the initiator 10 and also receives the read requestsent from the initiator 10 by receiving the electromagnetic wave that ismodulated with the use of the antenna coil or the like. In addition, thedata processing unit 25 sends the write response to the initiator 10 andalso sends the read response to the initiator by load-modulating andsending the electromagnetic wave sent by the initiator 10. The dataprocessing unit 25 sends the read data as well as the read response tothe initiator 10 when the generation of the read data is completed, andsends only the read response to the initiator 10 when the generation ofthe read data is not completed.

3. OPERATION OF COMMUNICATION SYSTEM

Next, the procedure of data communication performed between theinitiator 10 and the target 20 will be described with reference to FIG.4 to FIG. 6. FIG. 4 is a flowchart showing the operation of theinitiator 10, and FIG. 5 is a flowchart showing the operation of thetarget 20. In the following description, it will be assumed that a shortrange wireless communication link is established between the initiator10 and the target 20 through a polling request and a polling response.

The control unit 11 of the initiator 10 generates write data at anarbitrary timing. The write data is data that is sent from the initiator10 to the target 20 so that the data is stored in the target 20. Asshown in FIG. 4, the control unit 11 judges whether the generation ofthe write data is completed or not (at step S11). The control unit 11performs write processing at step S12 to step S16 when the generation ofthe write data to be sent to the target 20 is completed (“Yes” at stepS11), and performs read processing at step S17 to step S22 when thegeneration of the write data to be sent to the target 20 is notcompleted (“No” at step S11).

In the write processing, the control unit 11 generates a write requestas a communication request (at step S12). The write request is generatedin order for the initiator 10 to request the target 20 to write data.The control unit 11 supplies the write request and the write data to thedata processing unit 15. The write data can be directly supplied to thedata processing unit 15 by the control unit 11, or can be supplied afterbeing read out from the memory 13 by the control unit 11.

The data processing unit 15 sends the write request and the write datato the target 20 (at step S13), and receives a write response sent fromthe target 20 in response to the write request (at step S14). The writedata can be sent in the form of being included in the write request, orcan be sent independently of the write request. The write response isgenerated by the target 20 in order for the target to inform theinitiator 10 of the result of the data writing. The data processing unit15 supplies the received write response to the control unit 11.

The control unit 11 judges whether the data is properly written into thetarget 20 or not on the basis of the write response (at step S15). If itis judged that the data is properly written (“Yes” at step S15), thecontrol unit 11 deletes the data, which is stored in the memory unit 13and has already been written into the target 20, from the memory unit 13(at step S16). If it is not judged that the data is properly written(“No” at step S15), the control unit 11 makes an error response (at stepS23). In this error response, the control unit 11 can cause the flow togo back to the process at step S12 to restart the write processing, orcan cause the flow to go back to the process at step S11 to judgewhether the generation of the write data is completed or not.

On the other hand, in the read processing, the control unit 11 generatesa read request as a communication request (at step S17). The readrequest is generated in order for the initiator 10 to request the target20 to read out data. The control unit 11 supplies the read request tothe data processing unit 15.

The data processing unit 15 sends the read request to the target 20 (atstep S18), and receives a read response sent from the target 20 inresponse to the read request (at step S19). The read response isgenerated by the target 20 in order for the target 20 to inform theinitiator 10 of the result of the data reading. The data processing unit15 supplies the received read response to the control unit 11.

In this case, the data processing unit 15 receives read data along withthe read response sent from the target 20 when the generation of theread data is completed by the target 20, that is, when the generation ofthe read data to be sent to the initiator 10 is completed by the target20 that has already received the read request from the initiator 10. Onthe other hand, the data processing unit 15 does not receive the readdata from the target 20 when the generation of the read data is notcompleted by the target 20. The read data can be received in the form ofbeing included in the read response, or can be received independently ofthe read response.

The control unit 11 judges whether the data is properly read out by thetarget 20 or not on the basis of the read response (at step S20). If itis judged that the data is properly read out (“Yes” at step S20), thecontrol unit 11 judges whether the data processing unit 15 receives theread data or not (at step S21). If it is not judged that the data isproperly read (“No” at step S20), the control unit 11 makes an errorresponse (at step S23). In this error response, the control 11 can causethe flow to go back to the process at step S17 to restart the readprocessing, or can cause the flow to go back to the process at step S11to judge whether the generation of the write data is completed or not.If the data processing unit 15 has received the read data (“Yes” at stepS21), the control unit 11 acquires the read data from the dataprocessing unit 15, and stores the read data in the memory unit 13 (atstep S22).

In addition, even if the generation of the read data is not completed bythe target 20, the data processing unit 15 can receive dummy data alongwith the read response sent from the target 20. The dummy data isessentially not data to be sent to the initiator 10, and it is datauseless for the initiator 10. Again in this case, the dummy data can bereceived in the form of being included in the read response, or can bereceived independently of the read response.

After the process at step S16, the process at step S22, or when the dataprocessing unit 15 has not received the read data (“No” at step S21),the control unit 11 restarts the process at step S11. The control unit11 repeatedly performs the above-described processes as long as theshort range wireless communication link is established between theinitiator 10 and the target 20.

The control unit 21 of the target 20 receives a communication request(one of commands) from the reader/writer via the data processing unit25. As shown in FIG. 5, the control unit 21 judges whether thecommunication request is properly received or not (at step S31). If itis judged that the communication request is properly received (“Yes” atstep S31), the control unit 21 performs the following processes. If itis not judged that the communication request is properly received (“No”at step S31), the control unit 21 makes an error response (at step S43).The control unit 21 performs write processing at step S33 to step S36when receiving a write request (“Yes” at step S32), and performs readprocessing at step S38 to step S42 when receiving a read request (“Yes”at step S37).

In the write processing, the control unit 21 deletes the read data thathas been last sent to the initiator 10 as well as the last read responsefrom the memory unit 13 (at step S33). The above process is performedbecause the fact that the write request is received by the control unit21 means that the last read processing has been successfully completedbetween the initiator 10 and the target 20. The control unit 21 acquireswrite data as well as the write request, which is received by the dataprocessing unit 25, from the data processing unit 25, and stores thewrite data in the memory unit 23 (at step S34). The control unit 21supplies the result of the data writing to the data processing unit 25.The data processing unit 25 generates a write response including theresult of the data writing (at step S35), and sends the write responseto the initiator 10 (at step S36).

In the read processing, the control unit 21 judges whether thegeneration of read data to be sent is completed or not (at step S38).Here, the control unit 21 generates the read data at an arbitrarytiming. The read data is data to be sent from the target 20 so that theread data is read out by the initiator 10.

When the generation of the read data is completed (“Yes” at step S38),that is, when the generation of the read data to be sent to theinitiator 10 is completed, the control unit 21 supplies the result ofthe data reading along with the read data to the data processing unit25. The data processing unit 25 generates a read response including theresult of the data reading (at step S39), and sends the read responsealong with the read data to the initiator 10 (at step S40). The readdata can be sent in the form of being included in the read response, orcan be sent independently of the read response. On the other hand, whenthe generation of the read data is not completed (“No” at step S38), thecontrol unit 21 supplies the result of the data reading to the dataprocessing unit 25. The data processing unit 25 generates a readresponse including the result of the data reading (at step S41), andsends the read response to the initiator 10 (at step S42).

In addition, even if the generation of the read data is not completed,the data processing unit 25 can send dummy data along with the readresponse to the initiator 10. Again in this case, the dummy data can besent in the form of being included in the read response, or can be sentindependently of the read response.

After the processes at step S36, step S40 and step S42, the control unit21 makes the flow to go back to the step S31 to restart the operation ofthe target 20. The control unit 21 repeatedly performs theabove-described processes as long as the short range wirelesscommunication link is established between the initiator 10 and thetarget 20.

FIG. 6 is a sequence diagram showing a communication method according tothe embodiment of the present disclosure. In the following description,it will be assumed that a short range wireless communication link isestablished between the initiator 10 and the target 20 through a pollingrequest and a polling response.

An example of the sequence diagram in FIG. 6 shows four timings I1, I2,I3, and I4 in the control unit 11 of the initiator 10, and it will beassumed that write data (data 2) is generated just before a timing I3(at step S70). In addition, there are four timings T1, T2, T3, and T4 inthe control unit 21 of the target 20, and it will be assumed that readdata (data 1) is generated just before a timing T2 (at step S60).

First, because the generation of write data is not completed by thecontrol unit 11 of the initiator 10 before the timing I1, the initiator10 generates read request and supplies the read request to the dataprocessing unit 15 (at step S51). The data processing unit 15 sends theread request to the target 20 (at step S52).

The data processing unit 25 of the target 20 receives the read request,and notifies the control unit 21 of the read request (at step S53).Because the generation of read data is not completed by the control unit21 before the timing T1, the control unit 21 supplies void data or dummydata to the data processing unit 25 (at step S54). The data processingunit 25 generates read response, and sends the read response along withthe void data or dummy data to the initiator 10 (at step S55).

The data processing unit 15 of the initiator 10 receives the readresponse, and notifies the control unit 11 of the read response (at stepS56). In this case, the data processing unit 15 can supply the readresponse without no read data, or can supply the read response with thedummy data to the control unit 11.

Next, because the generation of write data is not completed by thecontrol unit 11 of the initiator 10 before the timing I2, the initiator10 generates read request and supplies the read request to the dataprocessing unit 15 (at step S61). The data processing unit 15 sends theread request to the target 20 (at step S62).

The data processing unit 25 of the target 20 receives the read request,and notifies the control unit 21 of the read request (at step S63).Because the generation of read data (data 1) is completed by the controlunit 21 before the timing T2 (at step S60), the control unit 21 suppliesthe read data to the data processing unit 25 (at step S64). The dataprocessing unit 25 generates read response, and sends the read responsealong with the read data to the initiator 10 (at step S65).

The data processing unit 15 of the initiator 10 receives the readresponse, and notifies the control unit 11 of the read response (at stepS66). In this case, the data processing unit 15 supplies the read datato the control unit 11, and the control unit 11 acquires the read datato store the read data in the memory unit 13. As a result, the read datais read out from the target 20 by the initiator 10.

Next, because the generation of write data (data 2) is completed by thecontrol unit 11 of the initiator 10 before the timing I3 (at step S70),the control unit 11 generates write request and supplies the writerequest as well as the write data to the data processing unit 15 (atstep S71). The data processing unit 15 sends the write request as wellas the write data to the target 20 (at step S72).

Upon receiving the write request, the data processing unit 25 of thetarget 20 notifies the control unit of the write request and sends thewrite data to the control unit 21 (at step S73). The control unit 21acquires the write data to store the write data in the memory unit 23,and notifies the data processing unit 25 of the result of the datawriting (OK) (at step S74). As a result, the write data is written inthe target 20 by the initiator 10. The data processing unit 25 generateswrite response, and sends the write response to the initiator 10 (atstep S75).

The data processing unit 15 of the initiator 10 receives the writeresponse, and notifies the control unit 11 of the write response (atstep S76).

Next, because the generation of write data is not completed by thecontrol unit 11 of the initiator 10 before the timing I4, the controlunit 11 generates read request and supplies the read request to the dataprocessing unit 15 (at step S81). The data processing unit 15 sends theread request to the target 20 (at step S82).

Upon receiving the read request, the data processing unit 25 of thetarget 20 notifies the control unit 21 of the read request (at stepS83). Because the generation of read data is not completed by thecontrol unit 21 before the timing T4, the control unit 21 supplies voiddata or dummy data to the data processing unit 25 (at step S84). Thedata processing unit 25 generates read response, and sends the readresponse along with the void data or dummy data to the initiator 10 (atstep S85).

The data processing unit 15 of the initiator 10 receives the readresponse, and notifies the control unit 11 of the read response (at stepS86). In this case, the data processing unit 15 can supply the readresponse without no read data, or can supply the read response with thedummy data to the control unit 11.

The above description about FIG. 6 has been made in the case where theread processing and the write processing are performed in this order.However, even in the case where the write processing and the readprocessing are performed in this order, or in the case where the sameprocessing is successively performed, the same description as above canbe made. In each of the above cases, read processing is repeatedlyperformed between the initiator 10 and the target 20 until the initiator10 generates write data.

4. EXAMPLE OF COMMUNICATION SYSTEM

The following description will be made about the case where theabove-described communication method is applied to a short rangewireless communication compliant with Type 3 Tag Operation specificationdefined by the NFC forum (registered trademark).

FIG. 7 is a diagram showing examples of data structures of communicationrequests/communication responses. A write request is equivalent to an“Updated Command” defined by the specification, and its data structureWreq includes fields for a request identifier (ID), a communication ID(IDm), the number of services (NOS), a service code list (SLST), thenumber of blocks (NOB), a block list (BLST), and write data (DATA). Thewrite request with this data structure Wreq that includes write data issent from the initiator 10 to the target 20. A write response isequivalent to an “Updated Response” defined by the specification, andits data structure Wreq includes fields for a response identifier (ID),a communication ID (IDm), and a result code (SF).

Upon receiving a write request, the data processing unit 25 of thetarget 20 extracts the request identifier, the number of blocks, theblock list, and the write data of the write request, and supplies themto the control unit 21. Here, the number of blocks and the block listrespectively indicate the number of blocks and the block codes of writedata to be written in the target 20. After the write processing iscompleted, the control unit 21 supplies a result code showing the resultof the data writing to the data processing unit 25. Here, the resultcode indicates whether the write processing is successfully completed ornot. The data processing unit 25 generates a write response includingdata of a response identification and a communication ID, and sends thewrite response along with the result code to the initiator 10.

A read request is equivalent to a “Check Command” defined by thespecification, and its data structure Rreq includes fields for a requestidentifier (ID), a communication ID (IDm), the number of services (NOS),a service code list (SLST), the number of blocks (NOB), a block list(BLST). A read response is equivalent to a “Check Response” defined bythe specification, and its data structure Rres includes fields for aresponse identifier (ID), a communication ID (IDm), a result code (SF),the number of blocks (NOB), and read data (DATA). The read response withthis data structure Rres that includes read data is sent from the target20 to the initiator 10.

Upon receiving a read request, the data processing unit 25 of the target20 extracts the request identifier, the number of blocks, and the blocklist of the read request, and supplies them to the control unit 21.Here, the number of blocks and the block list respectively indicate thenumber of blocks and the block codes of read data to be read out fromthe target 20. After the read processing is completed, the control unit21 supplies a result code, the number of blocks, and the read data tothe data processing unit 25. Here, the result code indicates whether theread processing is successfully completed or not, and the number ofblocks indicates the block number of the read data. The data processingunit 25 generates a read response including a response identification, acommunication ID, the number of blocks, the read data, and sends theread response along with the result code to the initiator 10.

FIG. 8 is a diagram showing an example of a data structure of anattribute information block. As shown in FIG. 8, the data structure AIof the attribute information block includes fields for a mapping version(Ver), the number of blocks simultaneously readable (Nbr), the number ofblocks simultaneously writable (Nbw), the number of memory area blocks(Nmaxb), a half-way write flag (WriteF), an access attribute flag(RWFlag), an effective data length (Ln), and an error checking code(Checksum).

Upon receiving a read request, the target 20 updates the effective datalength field and the error checking code field of the attributeinformation block, and supplies them along with a read response to theinitiator 10. In this case, when the target 20 generates read data, theeffective data length field is updated with the data length of the readdata. When the target 20 does not generate read data, the effective datalength field is updated with the value of “0”. Upon receiving theattribute information block along with the read response, the target 20reads out plural pieces of data whose number is designated by the valuein the effective data length field from the read data field of the readresponse.

5. CONCLUSION

As described above, according to the communication system andcommunication method of the present disclosure, the target 20 can sendread data to the initiator 10 at an arbitrary timing through respondingat the timing of the read data generation in response to a read requestthat the target repeatedly receives even if it does not have thenotification function of communication request. Therefore, a two-waycommunication can be effectively performed between the initiator 10 andthe target 20 in synchronization with the timing of data generation.

Although the detailed descriptions have been made about the preferredembodiments of the present disclosure with reference to the accompanyingdrawings, the present disclosure is not to be restricted by theabove-described embodiments. It will be obvious that those skilled inthe art of the present disclosure can easily conceive of variousalterations and modifications of the above embodiments of the presentdisclosure within the scope of the technical ideas described in thefollowing claims, and it is to be understood that such alterations andmodifications naturally fall within the technical scope of the presentdisclosure.

For example, the descriptions of the above embodiments of the presentdisclosure have been made under the assumption that the control unit 11of the initiator 10 and the control unit 21 of the target 20respectively judge whether the generation of the write data and thegeneration of read data are successfully completed or not. However,whether the generation of the write data and the generation of read dataare successfully completed or not can be judged respectively by the dataprocessing unit 15 of the initiator 10 and by the data processing unit25 of the target 20. In this case, after the data processing units 15and 25 are respectively notified of the generations of the write dataand the read data by the control units 11 and 21, these processing unitsjudge whether the generations of the write data and the read data aresuccessfully completed or not.

What is claimed is:
 1. A communication apparatus comprising: a datagenerating unit for generating write data to be sent to anothercommunication apparatus at an arbitrary timing; a communication unit forrepeatedly sending a read request to the other communication apparatusuntil the write data is generated and, at the same time, for repeatedlyreceiving a read response sent from the other communication apparatus inresponse to the read request; and a data acquisition unit for acquiringread data, which is sent along with the read response by the othercommunication apparatus, when the read data is generated at an arbitrarytiming by the other communication apparatus, in which only after theread data has been fully generated and after receipt of a respectiveread request after the read data has been fully generated, the othercommunication apparatus sends the read data for acquisition by the dataacquisition unit of the communication apparatus, such that the othercommunication apparatus sends the fully generated read data to thecommunication apparatus without having to issue a notificationcommunication to the communication apparatus indicating that the readdata has been fully generated prior to sending the fully generated readdata thereto, and in which communication between the communicationapparatus and the other communication apparatus, including all of thesending of the read request by the communication unit, all of thesending and receiving of the read response, and all of the sending andreceiving of the read data, is by way of a single type of communicationtechnology with a single type of protocol which is passive communicationin compliance with a near field communication (NFC) protocol forcommunication apparatuses spaced within approximately several tens ofcentimeters of each other.
 2. The communication apparatus according toclaim 1, in which when the write data is completely generated, thecommunication unit is configured to send the write data along with awrite request for receipt by the other communication apparatus and tonot send the read request for receipt by the other communicationapparatus.
 3. The communication apparatus according to claim 2, in whichafter the write data and the write request are sent and a response isreceived indicating that the write data has been properly written to theother communication, the communication apparatus is configured to startsending the read request for receipt by the other communicationapparatus.
 4. A communication apparatus comprising: a data generatingunit for generating read data to be sent to another communicationapparatus at an arbitrary timing; and a communication unit forrepeatedly receiving a read request sent from the other communicationapparatus until write data is generated by the other communicationapparatus and, at the same time, for repeatedly sending a read responseto the other communication apparatus in response to the read request,and for sending the read data along with the read response to the othercommunication apparatus when the read data is generated, in which onlyafter the read data has been fully generated and after receipt of arespective read request after the read data has been fully generated,the communication apparatus sends the read data for receipt by the othercommunication apparatus, such that the communication apparatus isconfigured to send the fully generated read data to the othercommunication apparatus without having to issue a notificationcommunication to the other communication apparatus indicating that theread data has been fully generated prior to sending the fully generatedread data thereto, and in which communication between the communicationapparatus and the other communication apparatus, including all of thesending of the read response by the communication unit, all of thesending and receiving of the read request, and all of the sending andreceiving of the read data, is by way of a single type of communicationtechnology with a single type of protocol which is passive communicationin compliance with a near field communication (NFC) protocol forcommunication apparatuses spaced within approximately several tens ofcentimeters of each other.
 5. A communication system comprising: a firstcommunication apparatus that includes: a data generating unit forgenerating write data to be sent to a second communication apparatus atan arbitrary timing; a communication unit for repeatedly sending a readrequest to the second communication apparatus until the write data isgenerated and, at the same time, for repeatedly receiving a readresponse sent from the second communication apparatus in response to theread request; and a data acquisition unit for acquiring read data, whichis sent along with the read response by the second communicationapparatus, when the read data is generated at an arbitrary timing by thesecond communication apparatus, and the second communication apparatusincludes: a data generating unit for generating read data to be sent tothe first communication apparatus at an arbitrary timing; and acommunication unit for repeatedly receiving the read request sent fromthe first communication apparatus until the write data is generated bythe first communication apparatus and, at the same time, for repeatedlysending the read response to the first communication apparatus inresponse to the read request, and for sending the read data along withthe read response to the first communication apparatus when the readdata is generated, in which only after the read data has been fullygenerated and after receipt of a respective read request after the readdata has been fully generated, the communication unit of the secondcommunication apparatus sends the read data for receipt by the firstcommunication apparatus, such that the second communication apparatus isconfigured to send the fully generated read data to the firstcommunication apparatus without having to issue a notificationcommunication to the first communication apparatus indicating that theread data has been fully generated prior to sending the fully generatedread data thereto, and in which communication between the firstcommunication apparatus and the second communication apparatus,including all of the sending and receiving of the read request, all ofthe sending and receiving of the read response, and all of the sendingand receiving of the read data, is by way of a single type ofcommunication technology with a single type of protocol which is passivecommunication in compliance with a near field communication (NFC)protocol for communication apparatuses spaced within approximatelyseveral tens of centimeters of each other.
 6. A communication methodcomprising: causing a first communication apparatus to generate writedata to be sent to a second communication apparatus at an arbitrarytiming; causing the second communication apparatus to generate read datato be sent to the first communication apparatus at an arbitrary timing;causing the first communication apparatus to repeatedly send a readrequest to the second communication apparatus until the write data isgenerated; causing the second communication apparatus to repeatedly senda read response in response to the read request to the firstcommunication apparatus; and causing the first communication apparatusto receive the read response and acquire the read data, which is sentalong with the read response by the second communication apparatus, whenthe read data is generated by the second communication apparatus, inwhich only after the read data has been fully generated and afterreceipt of a respective read request after the read data has been fullygenerated, the second communication apparatus sends the read data forreceipt by the first communication apparatus, such that the secondcommunication apparatus sends the fully generated read data to the firstcommunication apparatus without having to issue a notificationcommunication to the first communication apparatus indicating that theread data has been fully generated prior to sending the fully generatedread data thereto, and in which communication between the firstcommunication apparatus and the second communication apparatus,including all of the sending and receiving of the read request, all ofthe sending and receiving of the read response, and all of the sendingand receiving of the read data, is by way of a single type ofcommunication technology with a single type of protocol which is passivecommunication in compliance with a near field communication (NFC)protocol for communication apparatuses spaced within approximatelyseveral tens of centimeters of each other.
 7. A communication apparatusto communicate with other communication apparatus via short rangewireless communication, said communication apparatus comprising: a datagenerating unit for generating write data to be sent to anothercommunication apparatus at an arbitrary timing; and a communication unitfor repeatedly sending a read request via the short range wirelesscommunication to the other communication apparatus until the write datais generated and, for repeatedly receiving a read response via the shortrange wireless communication from the other communication apparatus inresponse to the read request, when the write data has been generated,the communication unit is configured to send the write data instead ofthe read request via the short range wireless communication to the othercommunication apparatus, and all of the short range wirelesscommunication between the communication apparatus and the othercommunication apparatus is a single type of communication technologywith a single type of protocol which is passive communication incompliance with a near field communication (NFC) protocol forcommunication apparatuses spaced within approximately several tens ofcentimeters of each other.
 8. The communication apparatus according toclaim 7, further comprising a data acquisition unit for acquiring readdata, which is sent along with the read response by the othercommunication apparatus, when the read data is generated by the othercommunication apparatus.
 9. The communication apparatus according toclaim 7, wherein, the communication unit is configured to repeatedlysend the read request to the other communication apparatus afterestablishing communication with the other communication apparatus.
 10. Acommunication apparatus to communicate with other communicationapparatus via short range wireless communication, said communicationapparatus comprising: a data generating unit for generating read data tobe sent to another communication apparatus at an arbitrary timing; acommunication unit for repeatedly receiving a read request sent via theshort range wireless communication from the other communicationapparatus until write data is generated by the other communicationapparatus and, for repeatedly sending a read response via the shortrange wireless communication to the other communication apparatus inresponse to the read request; and a data acquisition unit for acquiringread data, which is sent via the short range wireless communicationalong with the read response by the other communication apparatus, whenthe read data is generated by the other communication apparatus, all ofthe short range wireless communication between the communicationapparatus and the other communication apparatus is a single type ofcommunication technology with a single type of protocol which is passivecommunication in compliance with a near field communication (NFC)protocol for communication apparatuses spaced within approximatelyseveral tens of centimeters of each other.
 11. A communication apparatusto communicate with other communication apparatus via short rangewireless communication, said communication apparatus comprising: a datagenerating unit for generating read data to be sent to anothercommunication apparatus at an arbitrary timing; and a communication unitfor repeatedly receiving a read request sent via the short rangewireless communication from the other communication apparatus untilwrite data is generated by the other communication apparatus and, forrepeatedly sending a read response via the short range wirelesscommunication to the other communication apparatus in response to theread request, wherein the communication unit is configured to send theread data via the short range wireless communication along with the readresponse to the other communication apparatus when the read data isgenerated, and all of the short range wireless communication between thecommunication apparatus and the other communication apparatus is asingle type of communication technology with a single type of protocolwhich is passive communication in compliance with a near fieldcommunication (NFC) protocol for communication apparatuses spaced withinapproximately several tens of centimeters of each other.
 12. Thecommunication apparatus according to claim 11, wherein, on receiving awrite request sent from the other communication apparatus, thecommunication apparatus is configured to delete the read data sent tothe other communication apparatus along with the last read response. 13.The communication apparatus according to claim 11, wherein, thecommunication unit is configured to receive the write data from theother communication apparatus after establishing communication with theother communication apparatus, when the write data is generated by theother communication apparatus.
 14. The communication apparatus accordingto claim 11, wherein, the communication unit is configured to repeatedlysend a read response to the other communication apparatus in response tothe read request, when the read data is not generated.